package com.ycp.erp.warehouse.ui.fragment;

import android.os.Bundle;

import com.one.common.view.base.IListView;
import com.one.common.view.pagestate.listpage.BaseListFragment;
import com.ycp.erp.warehouse.model.bean.ProcurementWarehouse;
import com.ycp.erp.warehouse.presenter.WarehousePresenter;
import com.ycp.erp.warehouse.ui.binder.ProcyrementWarehouseBinder;

/**
 * Class Des:
 * Created by bjh on 2021/8/30.
 */
public class ProcureWareHouseFragment extends BaseListFragment<WarehousePresenter> implements IListView {
    @Override
    protected void initPresenter() {
        mPresenter=new WarehousePresenter(this,getActivity());
    }

    @Override
    public void registerDate() {
        ProcyrementWarehouseBinder procyrementWarehouseBinder =new ProcyrementWarehouseBinder();
        register(ProcurementWarehouse.class,procyrementWarehouseBinder);
    }

    @Override
    public void loadData() {
        mPresenter.getProcurementWarehouses();

    }

    @Override
    public void initData() {
        super.initData();
        mPresenter.getProcurementWarehouses();
    }

    /**
     * 获取一个任务列表的实例
     */
    public static ProcureWareHouseFragment getInstance(String taskState) {
        ProcureWareHouseFragment fragment = new ProcureWareHouseFragment();
        Bundle bundle = new Bundle();
        bundle.putString("taskState", taskState);
        fragment.setArguments(bundle);
        return fragment;
    }
}
